<div class="nav">
            <span class="menuButton">
               <%= link_to 'Home', "/timelines" %>
            </span>
            <span class="menuButton">
              <%= link_to 'Edit', edit_timeline_path(@timeline) %>
            </span>
            <span class="menuButton">
                <g:link class="list" action="events" id="${timeline.id}">Events</g:link>
            </span>
            <span class="menuButton">
                <%= link_to 'New timeline', new_timeline_path %>
            </span>
  </div>

<div class="body">
            <h1><%= @timeline.title %></h1>

<div id="tl" class="default-timeline">
 </div>

            <br>
 <div id="events-accordion" class="accordion">
	<div class="accordion-toggle">Events</div>
	<div class="accordion-content">
                <div class="list">

                <table>
                    <thead>
                        <tr>
                          <td>Id</td>
                           <td>Title</td>
                           <td>Actions</td>

                        </tr>
                    </thead>
                    <tbody>

                      <% timeline_event_counter=0 %>
                      <% @timeline_events.each do |timeline_event| %>

                               <% timeline_event_counter=timeline_event_counter+1 %>
                                <tr class=<%= ( timeline_event_counter.modulo(2))==0 ? "even" : "odd" %> >
                                  <td><%= timeline_event.id %></td>
                                  <td><%= timeline_event.title %></td>
                                  <td><%= link_to "Show",:controller=>"timeline_events", :action=>"show", :id => timeline_event.id%>

                                  <%= link_to "Edit",:controller=>"timeline_events", :action=>"edit", :id => timeline_event.id%>
                                  <%= link_to "Delete",:controller=>"timeline_events", :action=>"destroy", :id => timeline_event.id %>
                                  </td>
                                </tr>
                     <% end %>
                    </tbody>
                </table>
            </div>
               <div class="paginateButtons">
                <%= will_paginate @timeline_events %>
            </div>
          
        </div>

 </div>



</div>
<%= link_to 'Edit', edit_timeline_path(@timeline) %>
<%= link_to 'Back', timelines_path %>